<template>
	<view class="payment-pages">
		<CustomNav :isBack="true" color="#fff" :topBgColor="topBgColor" title="余额查询"></CustomNav>
		<view class="top-block">
			<view class="info-block">
				<view class="title FZHZGBJ">余额</view>
				<view class="price-item">￥
					<text class="price FZHZGBJ">{{info.price}}</text>
					<text style="color: #767676;">元</text>
				</view>
				<view class="info-item">
					<view class="name">户号</view>
					<view class="text">{{info.number}}</view>
				</view>
				<view class="info-item">
					<view class="name">用户名</view>
					<view class="text">{{info.name}}</view>
				</view>
				<view class="info-item">
					<view class="name">缴费单位</view>
					<view class="text">{{info.company}}</view>
				</view>
				<view class="info-item">
					<view class="name">用户地址</view>
					<view class="text">{{info.address}}</view>
				</view>
			</view>
		</view>
		<view class="payment-block">
			<view class="title FZHZGBJ">缴费记录</view>
			<view class="record-list" v-for="item in list" :key="item.id">
				<view class="name-item">
					<view class="name">{{item.name}}</view>
					<view class="count">+{{item.price}}</view>
				</view>
				<view class="time">{{item.creatTime}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					price: 120.5,
					number: 1003442328,
					name: '王*',
					company: '⾦塔县凯源天然⽓有限责任公司',
					address: '甘肃省⾦塔县泰安家园4号楼2单元601室'
				},
				list: [{
						id: 1,
						name: '燃气费',
						price: '100.00',
						creatTime: '2024-07-25 14:31'
					},
					{
						id: 2,
						name: '燃气费',
						price: '100.00',
						creatTime: '2024-06-20 16:48'
					}
				]
			}
		},
		methods: {}
	}
</script>

<style lang="scss" scoped>
	.payment-pages {
		overflow: hidden;
		min-height: 100vh;
		background-color: #F4F8FF;

		.top-block {
			padding: 180rpx 30rpx 20rpx 30rpx;
			background-image: linear-gradient(to bottom, #3153B6, #4173E7);

			.info-block {
				background: #FFFFFF;
				padding: 30rpx;
				border-radius: 20rpx;

				.title {
					margin-bottom: 30rpx;
					font-size: 32rpx;
				}

				.price-item {
					display: flex;
					align-items: center;
					color: #4376E4;
					font-size: 28rpx;
					margin-bottom: 20rpx;

					.price {
						font-size: 44rpx;
						margin-right: 10rpx;
					}
				}

				.info-item {
					display: flex;
					font-size: 30rpx;
					line-height: 65rpx;

					.name {
						width: 160rpx;
						color: #767676;
					}

					.text {
						width: calc(100% - 160rpx);
					}
				}
			}
		}

		.payment-block {
			width: calc(100% - 60rpx);
			margin: 30rpx auto;

			.title {
				font-size: 32rpx;
				margin-bottom: 30rpx;
			}

			.record-list {
				background-color: #FFFFFF;
				margin-bottom: 30rpx;
				padding: 30rpx;
				border-radius: 20rpx;

				.name-item {
					display: flex;
					align-items: center;
					justify-content: space-between;
					font-size: 30rpx;
				}

				.time {
					margin-top: 30rpx;
					color: #767676;
					font-size: 28rpx;
				}
			}
		}
	}
</style>